//
//  KFDTeacherIntroViewComposer.m
//  KFD
//
//  Created by JIRENTIANXIANG on 7/12/15.
//  Copyright © 2015 kfd. All rights reserved.
//

#import "KFDTeacherIntroViewComposer.h"
#import "KFDTeacher.h"
#import "JRTXLinearLayout.h"
#import "ui_config.h"

@implementation KFDTeacherIntroViewComposer

-(CGFloat)layout
{
    if (self.teacher) {
        NSString* intro=self.teacher.content;
        UILabel* introLabel=[[UILabel alloc]init];
        introLabel.text=intro;
        introLabel.font=[UIFont systemFontOfSize:12];
        introLabel.textColor=KFDColorRGB(0x80, 0x80, 0x80);
        JRTXLinearLayout* layout=[[JRTXLinearLayout alloc] initWithFrame:CGRectMake(10, 47, SCREEN_WIDTH, 0)];
        [layout appendBlankLineWithHeight:0.5 color:KFD_BG_COLOR];
        [layout appendBlankLineWithHeight:10];
        [layout appendLabel:introLabel  widthLimit:SCREEN_WIDTH-20 alignment:JRTXLinearLayoutAlignmentCenter];
        [layout appendBlankLineWithHeight:10];
        self.view=layout.view;
        return self.view.bounds.size.height;
    }
    return 0;
}

@end
